FILE(GLOB dnf_SRCS *.py)
INSTALL (FILES ${dnf_SRCS} DESTINATION ${PYTHON_INSTALL_DIR}/dnf)
# const.py is generated so the glob alone won't see it:
INSTALL (FILES const.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf)

# Generate dist-info metadata
SET(DISTINFO_PATH "${CMAKE_CURRENT_BINARY_DIR}/dnf-${DNF_VERSION}.dist-info")
SET(METADATA_FILE "${DISTINFO_PATH}/METADATA")
FILE(MAKE_DIRECTORY ${DISTINFO_PATH})
FILE(WRITE ${METADATA_FILE} "Metadata-Version: 2.1\n")
FILE(APPEND ${METADATA_FILE} "Name: dnf\n")
FILE(APPEND ${METADATA_FILE} "Version: ${DNF_VERSION}\n")
INSTALL(DIRECTORY ${DISTINFO_PATH} DESTINATION ${PYTHON_INSTALL_DIR})

ADD_SUBDIRECTORY (automatic)
ADD_SUBDIRECTORY (cli)
ADD_SUBDIRECTORY (conf)
ADD_SUBDIRECTORY (module)
ADD_SUBDIRECTORY (rpm)
ADD_SUBDIRECTORY (yum)
ADD_SUBDIRECTORY (db)
